Skip to main content
GET
/
v1
/
tasks
/
{task_id}
Get Task
curl --request GET \
  --url https://api.xpander.ai/v1/tasks/{task_id} \
  --header 'x-api-key: <api-key>'
{
  "id": "<string>",
  "agent_id": "<string>",
  "organization_id": "<string>",
  "input": {
    "text": "<string>",
    "files": [
      "<string>"
    ],
    "user": {
      "id": "<string>",
      "first_name": "<string>",
      "last_name": "<string>",
      "email": "<string>",
      "additional_attributes": {},
      "display_name": "<string>"
    }
  },
  "status": "pending",
  "internal_status": "<string>",
  "last_executed_node_id": "<string>",
  "agent_version": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z",
  "paused_at": "2023-11-07T05:31:56Z",
  "finished_at": "2023-11-07T05:31:56Z",
  "result": "<string>",
  "parent_execution": "<string>",
  "sub_executions": [
    "<string>"
  ],
  "finished_sub_executions": [
    "<string>"
  ],
  "is_manually_stopped": true,
  "payload_extension": {},
  "hitl_request": {
    "operation_id": "<string>",
    "approved_by": "<string>",
    "rejected_by": "<string>",
    "title": "<string>",
    "description": "<string>",
    "content": "<string>"
  },
  "pending_eca_request": {
    "connector_name": "<string>",
    "auth_url": "<string>"
  },
  "source": "<string>",
  "worker_id": "<string>",
  "additional_context": "<string>",
  "expected_output": "<string>",
  "output_format": "text",
  "output_schema": {},
  "events_streaming": true,
  "used_mutating_tools": true,
  "is_continuous": true,
  "mcp_servers": [
    {}
  ],
  "triggering_agent_id": "<string>",
  "title": "<string>"
}
Get complete details about a task including its current status, results, and execution history. This endpoint is essential for polling async tasks and retrieving final results.

Path Parameters

task_id
string
required
Unique identifier of the task to retrieve (UUID format)

Response

id
string
Unique identifier for the task (UUID)
agent_id
string
UUID of the agent that executed this task
organization_id
string
UUID of the organization that owns this task
status
string
Current task status: pending, running, completed, failed, cancelled
internal_status
string
Internal processing status for debugging
input
string
Original message/task sent to the agent
result
string
Task execution result content (only present when status is “completed”)
title
string
Optional task title or summary
source
string
Source of the task creation (e.g., api, dashboard, webhook)
parent_execution
string
UUID of parent task if this is a sub-task (null otherwise)
sub_executions
array
Array of UUIDs for any sub-tasks spawned by this task
triggering_agent_id
string
UUID of agent that triggered this task (if applicable)
created_at
string
ISO 8601 timestamp of when the task was created
started_at
string
ISO 8601 timestamp of when execution began (null if not started)
finished_at
string
ISO 8601 timestamp of when the task finished (null if still running)

Example Request

curl -X GET -H "x-api-key: YOUR_API_KEY" \
  https://api.xpander.ai/v1/tasks/333897e5-1c35-4598-a6ad-af5e0c101c84

Example Response

{
  "id": "333897e5-1c35-4598-a6ad-af5e0c101c84",
  "agent_id": "38551c1d-a16b-454f-84d4-68f431ba608b",
  "organization_id": "91fbe9bc-35b3-41e8-b59d-922fb5a0f031",
  "input": {
    "text": "What is 2+2? Just answer with the number.",
    "files": [],
    "user": null
  },
  "status": "completed",
  "internal_status": null,
  "last_executed_node_id": null,
  "agent_version": null,
  "created_at": "2025-11-06T06:41:54.048626Z",
  "started_at": null,
  "paused_at": null,
  "finished_at": "2025-11-06T06:41:57.507601Z",
  "result": "4",
  "parent_execution": null,
  "sub_executions": [],
  "finished_sub_executions": [],
  "is_manually_stopped": false,
  "payload_extension": null,
  "hitl_request": null,
  "pending_eca_request": null,
  "source": "api",
  "worker_id": null,
  "additional_context": null,
  "expected_output": null,
  "output_format": "text",
  "output_schema": null,
  "events_streaming": false,
  "used_mutating_tools": false,
  "is_continuous": false,
  "mcp_servers": [],
  "triggering_agent_id": null,
  "title": "API Test - Simple Math"
}

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

task_id
string
required

Response

Successful Response

id
string
required
agent_id
string
required
organization_id
string
required
input
object
required
created_at
string<date-time>
required
status
enum<string> | null
default:pending
Available options:
pending,
executing,
paused,
error,
failed,
completed,
stopped
internal_status
string | null
last_executed_node_id
string | null
agent_version
string | null
started_at
string<date-time> | null
paused_at
string<date-time> | null
finished_at
string<date-time> | null
result
string | null
parent_execution
string | null
sub_executions
string[] | null
finished_sub_executions
string[] | null
is_manually_stopped
boolean | null
default:false
payload_extension
object | null
hitl_request
object | null
pending_eca_request
object | null
source
string | null
worker_id
string | null
additional_context
string | null
expected_output
string | null
output_format
enum<string> | null
default:text
Available options:
text,
markdown,
json
output_schema
object | null
events_streaming
boolean | null
default:false
used_mutating_tools
boolean | null
default:false
is_continuous
boolean | null
default:false
mcp_servers
Mcp Servers · object[] | null
triggering_agent_id
string | null
title
string | null